﻿CREATE PROCEDURE [dbo].[proc_OpcoesRefeicoesUpdate]
(
	@IdRefeicaoContratada bigint,
	@DataRefeicao date,
	@CodOpcao nvarchar(3),
	@Descricao nvarchar(50)
)
AS
BEGIN

	SET NOCOUNT OFF
	DECLARE @Err int

	UPDATE [OpcoesRefeicoes]
	SET
		[Descricao] = @Descricao,
		[DataAlteracao] = GETDATE()
	WHERE
		[IdRefeicaoContratada] = @IdRefeicaoContratada
	AND	[DataRefeicao] = @DataRefeicao
	AND	[CodOpcao] = @CodOpcao


	SET @Err = @@Error


	RETURN @Err
END
